home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 January: Mac OS SDK / Dev.CD Jan 96 SDK / Dev.CD Jan 96 SDK1.toast / Development Kits (Disc 1) / QuickDraw™ GX / Programming Stuff / Sample Code / Graphics Samples / Test Cubics (cubic to quad) ƒ / TestCubics.r < prev    next >
Encoding:
Text File  |  1995-04-10  |  5.7 KB  |  314 lines  |  [TEXT/MPS ]

  1. /*---------------------------------------------------------------------------------------------
  2. FILENAME
  3.     TestClip.r
  4.     
  5. DESCRIPTION
  6.     This is the resource file which is used
  7.     both by the program
  8.     
  9. COPYRIGHT
  10.     ©1992 Copyright Apple Computer, Inc.
  11.     All rights reserved.
  12.             
  13. ---------------------------------------------------------------------------------------------*/
  14. #include "SysTypes.r"
  15. #include "Types.r"
  16.  
  17. #include "TestCubicsRef.h"
  18.  
  19.  
  20. resource 'vers' (1) {
  21.     0x01, 0x00, development, 0x1B,
  22.     verUS,
  23.     "1.0d27",
  24.     "1.0d27, Copyright © 1989 Apple Computer, Inc."
  25. };
  26.  
  27. /* we use an MBAR resource to conveniently load all the menus */
  28.  
  29. resource 'MBAR' (rMenuBar, preload) {
  30.     { mApple, mFile, mEdit, mClip, mError };        /* three menus */
  31. };
  32.  
  33.  
  34. resource 'MENU' (mApple, preload) {
  35.     mApple, textMenuProc,
  36.     0b1111111111111111111111111111101,    /* disable dashed gxLine, enable About and DAs */
  37.     enabled, apple,
  38.     {
  39.         "About TestClip…",
  40.             noicon, nokey, nomark, plain;
  41.         "-",
  42.             noicon, nokey, nomark, plain
  43.     }
  44. };
  45.  
  46. resource 'MENU' (mFile, preload) {
  47.     mFile, textMenuProc,
  48.     0b0000000000000000000000000010001,    /* enable quit */
  49.     enabled, "File",
  50.     {
  51.         "Open…",
  52.             noicon, "O", nomark, plain;
  53.         "-",
  54.             noicon, nokey, nomark, plain;
  55.         "Save as…",
  56.             noicon, nokey, nomark,plain;
  57.         "-",
  58.             noicon, nokey, nomark, plain;
  59.         "Quit",
  60.             noicon, "Q", nomark, plain
  61.     }
  62. };
  63.  
  64. resource 'MENU' (mEdit, preload) {
  65.     mEdit, textMenuProc,
  66.     0b0000000000000000000000000000000,    /* disable everything, program does the enabling */
  67.     enabled, "Edit",
  68.      {
  69.         "Undo",
  70.             noicon, "Z", nomark, plain;
  71.         "-",
  72.             noicon, nokey, nomark, plain;
  73.         "Cut",
  74.             noicon, "X", nomark, plain;
  75.         "Copy",
  76.             noicon, "C", nomark, plain;
  77.         "Paste",
  78.             noicon, "V", nomark, plain;
  79.         "Clear",
  80.             noicon, nokey, nomark, plain
  81.     }
  82. };
  83.  
  84. resource 'MENU' (mClip, preload) {
  85.     mClip, textMenuProc,
  86.     allEnabled,
  87.     enabled, "Points",
  88.     {
  89.         "Automatic",
  90.             noicon, "0", check, plain;
  91.         "1",
  92.             noicon, "1", nomark, plain;
  93.         "2",
  94.             noicon, "2", nomark, plain;
  95.         "3",
  96.             noicon, "3", nomark, plain;
  97.         "4",
  98.             noicon, "4", nomark, plain;
  99.         "5",
  100.             noicon, "5", nomark, plain;
  101.         "6",
  102.             noicon, "6", nomark, plain;
  103.         "7",
  104.             noicon, "7", nomark, plain;
  105.         "8",
  106.             noicon, "8", nomark, plain;
  107.         "9",
  108.             noicon, "9", nomark, plain;
  109.         "10",
  110.             noicon, nokey, nomark, plain
  111.  
  112.  
  113.     }
  114. };
  115.  
  116. resource 'MENU' (mError, preload) {
  117.     mError, textMenuProc,
  118.     allEnabled,
  119.     enabled, "Error",
  120.     {
  121.         "0.01",
  122.             noicon, nokey, nomark, plain;
  123.         "0.25",
  124.             noicon, nokey, check, plain;
  125.         "0.5",
  126.             noicon, nokey, nomark, plain;
  127.         "0.75",
  128.             noicon, nokey, nomark, plain;
  129.         "1.0",
  130.             noicon, nokey, nomark, plain;
  131.         "2.0",
  132.             noicon, nokey, nomark, plain;
  133.         "4.0",
  134.             noicon, nokey, nomark, plain;
  135.         "8.0",
  136.             noicon, nokey, nomark, plain
  137.     }
  138. };
  139.  
  140. resource 'ALRT' (rAboutAlert) {
  141.     {40, 40, 206, 320},
  142.     rAboutDITL,
  143.     {     
  144.         OK, visible, silent,
  145.         OK, visible, silent,
  146.         OK, visible, silent,
  147.         OK, visible, silent
  148.     }
  149. };
  150.  
  151. resource 'ALRT' (rClearAlert) {
  152.     {80, 178, 180, 414},
  153.     rClearDITL,
  154.     { /* array: 4 elements */
  155.         /* [1] */
  156.         OK, visible, silent,
  157.         /* [2] */
  158.         OK, visible, silent,
  159.         /* [3] */
  160.         OK, visible, silent,
  161.         /* [4] */
  162.         OK, visible, silent
  163.     }
  164. };
  165.  
  166.  
  167. resource 'DITL' (rAboutDITL) {
  168.     { /* array DITLarray: 5 elements */
  169.         /* [1] */
  170.         {122, 196, 142, 256},
  171.         Button {
  172.             enabled,
  173.             "OK"
  174.         },
  175.         /* [2] */
  176.         {12, 16, 54, 253},
  177.         StaticText {
  178.             disabled,
  179.             "Test application for the conversion of cubics"
  180.         },
  181.         /* [3] */
  182.         {65, 16, 85, 270},
  183.         StaticText {
  184.             disabled,
  185.             "Copyright ©1991-94 Apple Computer"
  186.         },
  187.         /* [4] */
  188.         {97, 16, 119, 153},
  189.         StaticText {
  190.             disabled,
  191.             "Brought to you by:"
  192.         },
  193.         /* [5] */
  194.         {130, 16, 152, 118},
  195.         StaticText {
  196.             disabled,
  197.             "Hugo M. Ayala"
  198.         }
  199.     }
  200. };
  201.  
  202. resource 'DITL' (rClearDITL) {
  203.     { /* array DITLarray: 3 elements */
  204.         /* [1] */
  205.         {67, 158, 87, 218},
  206.         Button {
  207.             enabled,
  208.             "Cancel"
  209.         },
  210.         /* [2] */
  211.         {66, 15, 86, 75},
  212.         Button {
  213.             enabled,
  214.             "OK"
  215.         },
  216.         /* [3] */
  217.         {22, 15, 56, 225},
  218.         StaticText {
  219.             enabled,
  220.             "Reset the current clip object ?"
  221.         }
  222.     }
  223. };
  224.  
  225.  
  226. resource 'WIND' (rDocWindow, preload, purgeable) {
  227.     {64, 60, 314, 460},
  228.     zoomDocProc, invisible, goAway, 0x0, "Test Clip"
  229. };
  230.  
  231. resource 'SIZE' (-1) {
  232.     dontSaveScreen,
  233.     ignoreSuspendResumeEvents,
  234.     disableOptionSwitch,
  235.     cannotBackground,
  236.     notMultiFinderAware,
  237.     backgroundAndForeground,
  238.     dontGetFrontClicks,
  239.     ignoreChildDiedEvents,
  240.     is32BitCompatible,
  241.     reserved,
  242.     reserved,
  243.     reserved,
  244.     reserved,
  245.     reserved,
  246.     reserved,
  247.     reserved,
  248.     kPrefSize * 1024,
  249.     kMinSize * 1024
  250. };
  251.  
  252.  
  253. type 'TCUB' as 'STR ';
  254.  
  255.  
  256. resource 'TCUB' (0) {
  257.     "Test program for cubics"
  258. };
  259.  
  260.  
  261. resource 'BNDL' (rBndl) {
  262.     'TCUB',
  263.     0,
  264.     {
  265.         'ICN#',
  266.         {
  267.             0, rIcon
  268.         },
  269.         'FREF',
  270.         {
  271.             0, rFref
  272.         }
  273.     }
  274. };
  275.  
  276.  
  277. resource 'FREF' (rFref) {
  278.     'APPL',
  279.     0,
  280.     ""
  281. };
  282.  
  283.  
  284. resource 'ICN#' (rIcon) {
  285.     { /* array: 2 elements */
  286.         /* [1] */
  287.         $"00 00 00 00 00 03 00 00 00 07 80 00 00 08 40 00"
  288.         $"00 10 20 00 00 20 10 00 00 40 08 00 00 80 04 00"
  289.         $"01 00 02 00 02 10 21 00 04 10 20 80 08 08 60 40"
  290.         $"10 08 40 20 20 04 80 10 40 04 80 08 C0 03 00 0C"
  291.         $"C0 03 00 0C 40 03 00 08 20 07 80 10 10 18 60 20"
  292.         $"08 24 90 40 04 24 90 80 02 18 61 00 01 00 02 00"
  293.         $"00 80 04 00 00 40 08 00 00 20 10 00 00 10 20 00"
  294.         $"00 08 40 00 00 07 80 00 00 03",
  295.         /* [2] */
  296.         $"00 00 00 00 00 03 00 00 00 07 80 00 00 0F C0 00"
  297.         $"00 1F E0 00 00 3F F0 00 00 7F F8 00 00 FF FC 00"
  298.         $"01 FF FE 00 03 EF DF 00 07 EF DF 80 0F F7 BF C0"
  299.         $"1F F7 BF E0 3F FB 7F F0 7F FB 7F F8 FF FC FF FC"
  300.         $"FF FC FF FC 7F FC FF F8 3F F8 7F F0 1F E7 9F E0"
  301.         $"0F DB 6F C0 07 DB 6F 80 03 E7 9F 00 01 FF FE 00"
  302.         $"00 FF FC 00 00 7F F8 00 00 3F F0 00 00 1F E0 00"
  303.         $"00 0F C0 00 00 07 80 00 00 03"
  304.     }
  305. };
  306.  
  307. resource 'CURS' (rHandCurs) {
  308.     $"01 80 1A 70 26 48 26 4A 12 4D 12 49 6A 09 98 01"
  309.     $"88 02 40 02 20 02 20 04 10 04 08 08 04 08 04 08",
  310.     $"01 80 1B F0 3F F8 3F FA 1F FF 1F FF 7F FF FF FF"
  311.     $"FF FE 7F FE 3F FE 3F FC 1F FC 0F F8 07 F8 07 F8",
  312.     {8, 5}
  313. };
  314.